﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace StripeDemo.Models
{
    public class Customer
    {
        [Required(ErrorMessage = "Id is required")]
        [StringLength(200, MinimumLength = 1)]
        public string CustomerId { get; set; }

        [Required(ErrorMessage = "FullName address is required")]
        [StringLength(200, MinimumLength = 1)]
        public string FullName { get; set; }

        [Required(ErrorMessage = "Billing Address is required")]
        [StringLength(200, MinimumLength = 1)]
        public string BillingAddress { get; set; }

        [Required(ErrorMessage = "Phone number is required")]
        [StringLength(15, MinimumLength = 9, ErrorMessage = "* A valid phone nunber is required.")]
        [Phone(ErrorMessage = "Please enter a valid phone number.")]
        public string PhoneNumber { get; set; }

        [Required(ErrorMessage = "Email address is required")]
        [Display(Name = "Email address")]
        [EmailAddress(ErrorMessage = "Invalid Email Address")]
        public string Email { get; set; }

        [Required(ErrorMessage = "ExtraCustomerInfo address is required")]
        [StringLength(500, MinimumLength = 1)]
        public string ExtraCustomerInfo { get; set; }

        public string DefaultCard { get; set; }
    }
}